---
title: Tree
description: A tree provides users with a way to navigate nested hierarchical information, with support for keyboard navigation and selection.
featured: true
component: true
links:
  doc: https://react-spectrum.adobe.com/react-aria/Tree.html
---

<Callout>
  🚧 This component is in beta by React Aria Components. Will update with more
  examples and uses when RAC documentation includes them.
</Callout>

<ComponentPreview name="tree-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Copy & Paste</TabsTrigger>
</TabsList>

<TabsContent value="cli">

<PackageManagerTabs>
  <PackageManagerContent value="npm">
    ```bash
    npx shadcn@latest add https://jollyui.dev/[[STYLE]]/tree
    ```
  </PackageManagerContent>
  <PackageManagerContent value="pnpm">
    ```bash
    pnpm dlx shadcn@latest add https://jollyui.dev/[[STYLE]]/tree
    ```

  </PackageManagerContent>
  <PackageManagerContent value="bun">
    ```bash
    bunx --bun shadcn@latest add https://jollyui.dev/[[STYLE]]/tree
    ```
  </PackageManagerContent>
  <PackageManagerContent value="yarn">
    ```bash 
    npx shadcn@latest add https://jollyui.dev/[[STYLE]]/tree
    ```
  </PackageManagerContent>
</PackageManagerTabs>

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>
  This components uses the following components, which you also need to install:
  - [Checkbox (checkbox.tsx)](../../../docs/components/checkbox)
</Step>

<Step>Copy and paste the following code into your project: tree.tsx</Step>

<ComponentSource name="tree" />

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</Tabs>
